import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["fieldProps", "unCheckedChildren", "checkedChildren", "proFieldProps"];
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import ProField from '../Field';
/**
 * @zh-cn 单选 Switch
 * @en-us Single Choice Switch
 */

var ProFormSwitch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
  var fieldProps = _ref.fieldProps,
      unCheckedChildren = _ref.unCheckedChildren,
      checkedChildren = _ref.checkedChildren,
      proFieldProps = _ref.proFieldProps,
      rest = _objectWithoutProperties(_ref, _excluded);

  return _jsx(ProField, _objectSpread({
    valueType: "switch",
    mode: "edit",
    fieldProps: _objectSpread({
      unCheckedChildren: unCheckedChildren,
      checkedChildren: checkedChildren
    }, fieldProps),
    ref: ref,
    valuePropName: "checked",
    proFieldProps: proFieldProps,
    filedConfig: {
      valuePropName: 'checked',
      ignoreWidth: true
    }
  }, rest));
});
export default ProFormSwitch;